package cn.kgc.client;

import cn.kgc.base.vo.UmsMemberReceiveAddressVo;
import cn.kgc.commons.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;

/**
 * <p>添加描述信息</p>
 *
 * @author 卢传琪
 */
@Component
@Slf4j
public class UmsFeignClientImpl implements UmsFeignClient {
    @Override
    public Result<List<UmsMemberReceiveAddressVo>> getUmsMemberReceiveAddress(Long memberId) {
        log.error("获得用户:{},收货地址失败，服务接口降级",memberId);
        return Result.error(null,"http://mall-ums/ums/MemberReceiveAddress/mylist", HttpStatus.OK.value(),"获得用户收货地址失败，服务接口降级");
    }

    @Override
    public Result<UmsMemberReceiveAddressVo> selectOne(Serializable id) {
        log.error("获得收货地址失败，服务接口降级,地址的id:{}",id);
        return Result.error(null,"http://mall-ums/ums/MemberReceiveAddress/{id}", HttpStatus.OK.value(),"获得用户收货地址失败，服务接口降级");

    }
}

